package eventmanager.frontend;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

import eventmanager.backend.event.EventList;
import eventmanager.backend.event.EventManager;

public class ExecuteProgram extends EventList {
	
	private static JPanel startPanel;
	private static JButton eventButton;
	private static EventManager em;
	
	static public void main(String args[]){
		startPanel = new JPanel();
		new EventList();
		em = new EventManager();
		System.out.println("Array Made");
		
		startPanel.setBackground(Color.WHITE);
		eventButton = new JButton("Make Event");
		eventButton.addActionListener(new ActionListener(){

			public void actionPerformed(ActionEvent e) {
				System.out.println("button pushed");
				new TestGUIEventDetails();
			}
			
		});
		
		JButton iterateButton = new JButton("Iterate through Array");
		iterateButton.addActionListener(new ActionListener(){
			
			public void actionPerformed(ActionEvent e) {
				System.out.println("Iterating...");
				em.goThroughArray(eventList);
			}
		});
		

		startPanel.setLayout(null);
		eventButton.setBounds(90, 70, 100, 20);
		iterateButton.setBounds(60, 100, 155, 20);
		startPanel.add(eventButton);
		startPanel.add(iterateButton);
		
		
		new TestGUI(startPanel);
		
		System.out.println("making frame...");
	}
}
